from django.db import models

from myuser.models import MyUser
from prj005.models.info import Info
from prj005.models.models import CreateTimeModel


class Result(CreateTimeModel):
    owner = models.ForeignKey(MyUser, on_delete=models.CASCADE, related_name='prj005_result')

    info = models.OneToOneField(Info, on_delete=models.CASCADE, related_name='result')

    PAIN_LEVEL_CHOICES = (
        ('疼痛消失', '疼痛消失'),
        ('疼痛明显缓解', '疼痛明显缓解'),
        ('疼痛有所缓解', '疼痛有所缓解'),
        ('疼痛未缓解或有加重', '疼痛未缓解或有加重')
    )

    pain_xia = models.CharField(max_length=10, choices=PAIN_LEVEL_CHOICES, blank=True, null=True, verbose_name='下腹疼痛缓解情况', help_text='下腹疼痛缓解情况')

    pain_yao = models.CharField(max_length=10, choices=PAIN_LEVEL_CHOICES, blank=True, null=True, verbose_name='腰骶部疼痛缓解情况', help_text='腰骶部疼痛缓解情况')

    PAIN_DAI_CHOICES = (
        ('恢复正常', '恢复正常'),
        ('明显改善', '明显改善'),
        ('有所改善', '有所改善'),
        ('无改善', '无改善')
    )
    pain_dai = models.CharField(max_length=10, choices=PAIN_DAI_CHOICES, blank=True, null=True, verbose_name='带下异常改善情况', help_text='带下异常改善情况')

    PAIN_QI_CHOICES = (
        ('经期恢复正常', '经期恢复正常'),
        ('明显改善', '明显改善'),
        ('有所改善', '有所改善'),
        ('无改善', '无改善')
    )
    pain_qi = models.CharField(max_length=10, choices=PAIN_QI_CHOICES, blank=True, null=True, verbose_name='经期异常改善情况', help_text='经期异常改善情况')

    PAIN_LIANG_CHOICES = (
        ('经量恢复正常', '经量恢复正常'),
        ('明显改善', '明显改善'),
        ('有所改善', '有所改善'),
        ('无改善', '无改善')
    )
    pain_liang = models.CharField(max_length=10, choices=PAIN_LIANG_CHOICES, blank=True, null=True, verbose_name='经量异常改善情况', help_text='经量异常改善情况')

    PAIN_GOOD_CHOICES = (
        ('体征消失', '体征消失'),
        ('体征明显改善', '体征明显改善'),
        ('体征有所改善', '体征有所改善'),
        ('体征无改善或有加重', '体征无改善或有加重'),
    )
    pain_fu = models.CharField(max_length=10, choices=PAIN_GOOD_CHOICES, blank=True, null=True, verbose_name='腹部体征改善情况', help_text='腹部体征改善情况')

    pain_pen = models.CharField(max_length=10, choices=PAIN_GOOD_CHOICES, blank=True, null=True, verbose_name='盆腔体征（妇科检查）改善情况', help_text='盆腔体征（妇科检查）改善情况')

    class Meta:
        verbose_name = '疗效'
        verbose_name_plural = verbose_name
